/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ipo.mm.web.formbeans;

import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.ipo.mm.web.util.ConstantManager;

/**
 *
 * @author makcro
 */
public class RepresentativeSearchBean extends org.apache.struts.action.ActionForm {

    private String nameFilter;
    private String nameOperator;
    private String telephoneFilter;
    private String telephoneOperator;
    private String faxFilter;
    private String faxOperator;
    private String emailFilter;
    private String emailOperator;
    private String functionFilter;
    private String functionOperator;

    private String[] institutionFilter;
    private String[] iTypeFilter;
    private String[] iRegionFilter;
    private String[] iFamilyFilter;
    private String[] iCityFilter;

    private String orderBy;




    /**
     *
     */
    public RepresentativeSearchBean() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        return null;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }


    /**
     * @return the firstNameFilter
     */
    

    public String[] getiCityFilter() {
        return iCityFilter;
    }

    public void setiCityFilter(String[] iCityFilter) {
        this.iCityFilter = iCityFilter;
    }

    public String[] getiFamilyFilter() {
        return iFamilyFilter;
    }

    public void setiFamilyFilter(String[] iFamilyFilter) {
        this.iFamilyFilter = iFamilyFilter;
    }

    public String[] getiRegionFilter() {
        return iRegionFilter;
    }

    public void setiRegionFilter(String[] iRegionFilter) {
        this.iRegionFilter = iRegionFilter;
    }

    public String[] getiTypeFilter() {
        return iTypeFilter;
    }

    public void setiTypeFilter(String[] iTypeFilter) {
        this.iTypeFilter = iTypeFilter;
    }

    public String[] getInstitutionFilter() {
        return institutionFilter;
    }

    public void setInstitutionFilter(String[] institutionFilter) {
        this.institutionFilter = institutionFilter;
    }

    public String getNameFilter() {
        return nameFilter;
    }

    public void setNameFilter(String nameFilter) {
        try {
            this.nameFilter = new String(nameFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(RepresentativeSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getNameOperator() {
        return nameOperator;
    }

    public void setNameOperator(String nameOperator) {
        this.nameOperator = nameOperator;
    }


    /**
     * @param firstNameFilter the firstNameFilter to set
     */
    

    /**
     * @return the telephoneFilter
     */
    public String getTelephoneFilter() {
        return telephoneFilter;
    }

    /**
     * @param telephoneFilter the telephoneFilter to set
     */
    public void setTelephoneFilter(String telephoneFilter) {
        this.telephoneFilter = telephoneFilter;
    }

    /**
     * @return the telephoneOperator
     */
    public String getTelephoneOperator() {
        return telephoneOperator;
    }

    /**
     * @param telephoneOperator the telephoneOperator to set
     */
    public void setTelephoneOperator(String telephoneOperator) {
        this.telephoneOperator = telephoneOperator;
    }

    /**
     * @return the faxFilter
     */
    public String getFaxFilter() {
        return faxFilter;
    }

    /**
     * @param faxFilter the faxFilter to set
     */
    public void setFaxFilter(String faxFilter) {
        this.faxFilter = faxFilter;
    }

    /**
     * @return the faxOperator
     */
    public String getFaxOperator() {
        return faxOperator;
    }

    /**
     * @param faxOperator the faxOperator to set
     */
    public void setFaxOperator(String faxOperator) {
        this.faxOperator = faxOperator;
    }

    /**
     * @return the emailFilter
     */
    public String getEmailFilter() {
        return emailFilter;
    }

    /**
     * @param emailFilter the emailFilter to set
     */
    public void setEmailFilter(String emailFilter) {
        this.emailFilter = emailFilter;
    }

    /**
     * @return the emailOperator
     */
    public String getEmailOperator() {
        return emailOperator;
    }

    /**
     * @param emailOperator the emailOperator to set
     */
    public void setEmailOperator(String emailOperator) {
        this.emailOperator = emailOperator;
    }

    /**
     * @return the functionFilter
     */
    public String getFunctionFilter() {
        return functionFilter;
    }

    /**
     * @param functionFilter the functionFilter to set
     */
    public void setFunctionFilter(String functionFilter) {
        try {
            this.functionFilter = new String(functionFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(RepresentativeSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * @return the functionOperator
     */
    public String getFunctionOperator() {
        return functionOperator;
    }

    /**
     * @param functionOperator the functionOperator to set
     */
    public void setFunctionOperator(String functionOperator) {
        this.functionOperator = functionOperator;
    }
}
